Acoustic echo cancellation (AEC) algorithms are used to suppress the echo from a loudspeaker(s) that can be captured by a microphone(s) located in close proximity. Typically, AEC is used during full-duplex communication between someone located in a near-end room speaking with another person located remotely in a far-end room. When the far-end person speaks, their voice is played through the speakers in the near-end room. The echo from the far-end person's speech is then captured by the near-end microphone(s). Without AEC, the far-end speech echo would be transmitted back to the far-end and the far-end person would hear a delayed echo of their previous speech out of the speakers in the far-end room.
When far-end speech is played from loudspeakers located in the near-end room simultaneously when there is near-end speech, the condition is commonly referred to as doubletalk. If the coefficients for the AEC's adaptive filters are updated when there is any near-end speech or other transient acoustic signal in the near-end room or when there is doubletalk, the adaptive filters will converge in such a manner as to cancel part of the near-end speech in addition to the echo from the loudspeaker. Cancellation of the near-end speech leads to distortion of processed speech signal and should be avoided.